package com.gopay.common.domain.pg;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.gopay.common.cipher.utils.SensitiveInfoUtils;
import com.gopay.common.domain.BaseEntity;

@Entity
@Table(name = "PG_CB_RMB_ORDER_TRANS_DTL")
public class PgCbRmbOrderTransDtl extends BaseEntity {
	/**
	* 
	*/
	private static final long serialVersionUID = 1L;
	private Long transDtlSq;
	private String merTxnCd;
	private String merId;
	private String payAcctId;
	private String oriFileName;
	private Date fileUploadDateTime;
	private String merOrderId;
	private String frontMerUrl;
	private String backgroundMerUrl;
	private String tradeType;
	private BigDecimal tranAmt;
	private String payeeBankName;
	private String payeeAccountNo;
	private String payeeCountryNo;
	private String payeeName;
	private String payeeBankSwift;
	private String payeeBankNo;
	private String tradeComment;
	private String custType;
	private Date tranDateTime;
	private String charset;
	private BigDecimal feeAmt;
	private BigDecimal postAmt;
	private BigDecimal totalAmt;
	private String gopayOrderId;
	private Date merTxnTm;
	private Date gopayTxnTm;
	private Date gopayServerTime;
	private String gatewayChannel;
	private String currencyType;
	private String merNotifyStat;
	private String refundAcct;
	private String authId;
	private String legalOrderRepaet;
	private String gatewayVersion;
	private String signType;
	private String tranType;
	private String respCode;
	private String tranIP;
	private String msgExt;
	private String remark;
	private Date createdTs;
	private Date lastUpdTs;
	private String merRemark3;
	private String merRemark1;
	private String merRemark2;
	private String merRemark4;
	private String merRemark5;
	/** 商户上送Refer网站地址 */
	private String merRefer;
	private String approve;// 是否审核标识
	private String language;
	private String headerIP;
	/**
	 * 商品名称
	 */
	private String goodsName;
	/**
	 * 商品描述
	 */
	private String goodsDesc;

	/**
	 * 原商户订单号
	 */
	private String origMerOrderId;

	/**
	 * 原商户订单时间
	 */
	private Date origMerOrderTm;

	/**
	 * 原商户订单金额
	 */
	private BigDecimal origMerOrderAmt;

	public PgCbRmbOrderTransDtl() {
	}

	@Id
	@GeneratedValue(generator = "PgCbrmbOrderTransDtlSequence", strategy = GenerationType.SEQUENCE)
	@SequenceGenerator(name = "PgCbrmbOrderTransDtlSequence", sequenceName = "PG_CB_RMB_ORDER_TRANS_DTL_SEQ")
	@Column(name = "TRANS_DTL_SQ", unique = true, nullable = false, length = 30)
	public Long getTransDtlSq() {
		return this.transDtlSq;
	}

	public void setTransDtlSq(Long transDtlSq) {
		this.transDtlSq = transDtlSq;
	}

	@Column(name = "MER_TXN_CD")
	public String getMerTxnCd() {
		return merTxnCd;
	}

	public void setMerTxnCd(String merTxnCd) {
		this.merTxnCd = merTxnCd;
	}

	@Column(name = "MER_ID")
	public String getMerId() {
		return merId;
	}

	public void setMerId(String merId) {
		this.merId = merId;
	}

	@Column(name = "PAY_ACCT_ID")
	public String getPayAcctId() {
		return payAcctId;
	}

	public void setPayAcctId(String payAcctId) {
		this.payAcctId = payAcctId;
	}

	@Column(name = "ORI_FILE_NAME")
	public String getOriFileName() {
		return oriFileName;
	}

	public void setOriFileName(String oriFileName) {
		this.oriFileName = oriFileName;
	}

	@Column(name = "FILE_UPLOAD_DATE_TIME")
	public Date getFileUploadDateTime() {
		return fileUploadDateTime;
	}

	public void setFileUploadDateTime(Date fileUploadDateTime) {
		this.fileUploadDateTime = fileUploadDateTime;
	}

	@Column(name = "MER_ORDER_ID")
	public String getMerOrderId() {
		return merOrderId;
	}

	public void setMerOrderId(String merOrderId) {
		this.merOrderId = merOrderId;
	}

	@Column(name = "FRONT_MER_URL")
	public String getFrontMerUrl() {
		return frontMerUrl;
	}

	public void setFrontMerUrl(String frontMerUrl) {
		this.frontMerUrl = frontMerUrl;
	}

	@Column(name = "BACK_GROUND_MER_URL")
	public String getBackgroundMerUrl() {
		return backgroundMerUrl;
	}

	public void setBackgroundMerUrl(String backgroundMerUrl) {
		this.backgroundMerUrl = backgroundMerUrl;
	}

	@Column(name = "TRADE_TYPE")
	public String getTradeType() {
		return tradeType;
	}

	public void setTradeType(String tradeType) {
		this.tradeType = tradeType;
	}

	@Column(name = "TRAN_AMT")
	public BigDecimal getTranAmt() {
		return tranAmt;
	}

	public void setTranAmt(BigDecimal tranAmt) {
		this.tranAmt = tranAmt;
	}

	@Column(name = "PAYEE_BANK_NAME")
	public String getPayeeBankName() {
		return payeeBankName;
	}

	public void setPayeeBankName(String payeeBankName) {
		this.payeeBankName = payeeBankName;
	}

	@Column(name = "PAYEE_ACCOUNT_NO")
	public String getPayeeAccountNo() {
        this.payeeAccountNo = SensitiveInfoUtils.autoReencrypt(this.payeeAccountNo);
        return SensitiveInfoUtils.smartDecryptWithCheck(this.payeeAccountNo);
	}

	public void setPayeeAccountNo(String payeeAccountNo) {
	    this.payeeAccountNo = SensitiveInfoUtils.smartEncryptWithCheck(payeeAccountNo);
	}

	@Column(name = "PAYEE_COUNTRY_NO")
	public String getPayeeCountryNo() {
		return payeeCountryNo;
	}

	public void setPayeeCountryNo(String payeeCountryNo) {
		this.payeeCountryNo = payeeCountryNo;
	}

    @Column(name = "PAYEE_NAME")
    public String getPayeeName() {
     // edit by huangcheng 2017年2月24日15:43:08 PCI认证修改
        this.payeeName = SensitiveInfoUtils.autoReencrypt(this.payeeName);
        return SensitiveInfoUtils.smartDecryptWithCheck(this.payeeName);
    }

    public void setPayeeName(String payeeName) {
        this.payeeName = SensitiveInfoUtils.smartEncryptWithCheck(payeeName);
    }
	@Column(name = "PAYEE_BANK_SWIFT")
	public String getPayeeBankSwift() {
		return payeeBankSwift;
	}

	public void setPayeeBankSwift(String payeeBankSwift) {
		this.payeeBankSwift = payeeBankSwift;
	}

	@Column(name = "PAYEE_BANK_NO")
	public String getPayeeBankNo() {
		return payeeBankNo;
	}

	public void setPayeeBankNo(String payeeBankNo) {
		this.payeeBankNo = payeeBankNo;
	}

	@Column(name = "TRADE_COMMENT")
	public String getTradeComment() {
		return tradeComment;
	}

	public void setTradeComment(String tradeComment) {
		this.tradeComment = tradeComment;
	}

	@Column(name = "CUST_TYPE")
	public String getCustType() {
		return custType;
	}

	public void setCustType(String custType) {
		this.custType = custType;
	}

	@Column(name = "TRAN_DATE_TMIE")
	public Date getTranDateTime() {
		return tranDateTime;
	}

	public void setTranDateTime(Date tranDateTime) {
		this.tranDateTime = tranDateTime;
	}
	@Column(name = "CHARSET")
	public String getCharset() {
		return charset;
	}

	public void setCharset(String charset) {
		this.charset = charset;
	}

	@Column(name = "FEE_AMT")
	public BigDecimal getFeeAmt() {
		return feeAmt;
	}

	public void setFeeAmt(BigDecimal feeAmt) {
		this.feeAmt = feeAmt;
	}

	@Column(name = "POST_AMT")
	public BigDecimal getPostAmt() {
		return postAmt;
	}

	public void setPostAmt(BigDecimal postAmt) {
		this.postAmt = postAmt;
	}

	@Column(name = "GOPAY_ORDER_ID")
	public String getGopayOrderId() {
		return gopayOrderId;
	}

	public void setGopayOrderId(String gopayOrderId) {
		this.gopayOrderId = gopayOrderId;
	}
	@Column(name = "MER_TXN_TM")
	public Date getMerTxnTm() {
		return merTxnTm;
	}

	public void setMerTxnTm(Date merTxnTm) {
		this.merTxnTm = merTxnTm;
	}

	@Column(name = "GOPAY_TXN_TM")
	public Date getGopayTxnTm() {
		return gopayTxnTm;
	}

	public void setGopayTxnTm(Date gopayTxnTm) {
		this.gopayTxnTm = gopayTxnTm;
	}
	@Column(name = "GOPAY_SERVER_TIME")
	public Date getGopayServerTime() {
		return gopayServerTime;
	}

	public void setGopayServerTime(Date gopayServerTime) {
		this.gopayServerTime = gopayServerTime;
	}
	@Column(name = "GATEWAY_CHANNEL")
	public String getGatewayChannel() {
		return gatewayChannel;
	}

	public void setGatewayChannel(String gatewayChannel) {
		this.gatewayChannel = gatewayChannel;
	}
	@Column(name = "CURRENCY_TYPE")
	public String getCurrencyType() {
		return currencyType;
	}

	public void setCurrencyType(String currencyType) {
		this.currencyType = currencyType;
	}
	@Column(name = "MER_NOTIFY_STAT")
	public String getMerNotifyStat() {
		return merNotifyStat;
	}

	public void setMerNotifyStat(String merNotifyStat) {
		this.merNotifyStat = merNotifyStat;
	}
	@Column(name = "REFUND_ACCT")
	public String getRefundAcct() {
		return refundAcct;
	}

	public void setRefundAcct(String refundAcct) {
		this.refundAcct = refundAcct;
	}

	@Column(name = "AUTH_ID")
	public String getAuthId() {
		return authId;
	}

	public void setAuthId(String authId) {
		this.authId = authId;
	}

	@Column(name = "LEGAL_ORDER_REPAET")
	public String getLegalOrderRepaet() {
		return legalOrderRepaet;
	}

	public void setLegalOrderRepaet(String legalOrderRepaet) {
		this.legalOrderRepaet = legalOrderRepaet;
	}

	@Column(name = "GATEWAY_VERSION")
	public String getGatewayVersion() {
		return gatewayVersion;
	}

	public void setGatewayVersion(String gatewayVersion) {
		this.gatewayVersion = gatewayVersion;
	}

	@Column(name = "SIGN_TYPE")
	public String getSignType() {
		return signType;
	}

	public void setSignType(String signType) {
		this.signType = signType;
	}

	@Column(name = "TRAN_TYPE")
	public String getTranType() {
		return tranType;
	}

	public void setTranType(String tranType) {
		this.tranType = tranType;
	}
	@Column(name = "RESP_CODE")
	public String getRespCode() {
		return respCode;
	}

	public void setRespCode(String respCode) {
		this.respCode = respCode;
	}
	@Column(name = "TRAN_IP")
	public String getTranIP() {
		return tranIP;
	}

	public void setTranIP(String tranIP) {
		this.tranIP = tranIP;
	}
	@Column(name = "MSG_EXT")
	public String getMsgExt() {
		return msgExt;
	}

	public void setMsgExt(String msgExt) {
		this.msgExt = msgExt;
	}

	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "CREATED_TS")
	public Date getCreatedTs() {
		return createdTs;
	}

	public void setCreatedTs(Date createdTs) {
		this.createdTs = createdTs;
	}

	@Column(name = "LASTUPD_TS")
	public Date getLastUpdTs() {
		return lastUpdTs;
	}

	public void setLastUpdTs(Date lastUpdTs) {
		this.lastUpdTs = lastUpdTs;
	}

	@Column(name = "MER_REMARK3")
	public String getMerRemark3() {
		return merRemark3;
	}

	public void setMerRemark3(String merRemark3) {
		this.merRemark3 = merRemark3;
	}

	@Column(name = "MER_REMARK1")	
	public String getMerRemark1() {
		return merRemark1;
	}

	public void setMerRemark1(String merRemark1) {
		this.merRemark1 = merRemark1;
	}
	@Column(name = "MER_REMARK2")
	public String getMerRemark2() {
		return merRemark2;
	}

	public void setMerRemark2(String merRemark2) {
		this.merRemark2 = merRemark2;
	}
	@Column(name = "MER_REMARK4")
	public String getMerRemark4() {
		return merRemark4;
	}

	public void setMerRemark4(String merRemark4) {
		this.merRemark4 = merRemark4;
	}
	
	@Column(name = "MER_REMARK5")
	public String getMerRemark5() {
		return merRemark5;
	}

	public void setMerRemark5(String merRemark5) {
		this.merRemark5 = merRemark5;
	}

	@Column(name = "MER_REFER")
	public String getMerRefer() {
		return merRefer;
	}

	public void setMerRefer(String merRefer) {
		this.merRefer = merRefer;
	}

	@Column(name = "APPROVE")
	public String getApprove() {
		return approve;
	}

	public void setApprove(String approve) {
		this.approve = approve;
	}

	@Column(name = "LANGUAGE")
	public String getLanguage() {
		return language;
	}

	public void setLanguage(String language) {
		this.language = language;
	}

	@Column(name = "TOTAL_AMT")
	public BigDecimal getTotalAmt() {
		return totalAmt;
	}

	public void setTotalAmt(BigDecimal totalAmt) {
		this.totalAmt = totalAmt;
	}

	@Column(name="HEADER_IP")
	public String getHeaderIP() {
		return headerIP;
	}

	public void setHeaderIP(String headerIP) {
		this.headerIP = headerIP;
	}

	@Column(name="GOODS_NAME")
    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    @Column(name="GOODS_DESC")
    public String getGoodsDesc() {
        return goodsDesc;
    }

    public void setGoodsDesc(String goodsDesc) {
        this.goodsDesc = goodsDesc;
    }

    @Column(name = "ORIG_MER_ORDER_ID", length = 30)
	public String getOrigMerOrderId() {
		return origMerOrderId;
	}

	public void setOrigMerOrderId(String origMerOrderId) {
		this.origMerOrderId = origMerOrderId;
	}

	@Column(name = "ORIG_MER_ORDER_TM")
	public Date getOrigMerOrderTm() {
		return origMerOrderTm;
	}

	public void setOrigMerOrderTm(Date origMerOrderTm) {
		this.origMerOrderTm = origMerOrderTm;
	}

	@Column(name = "ORIG_MER_ORDER_AMT")
	public BigDecimal getOrigMerOrderAmt() {
		return origMerOrderAmt;
	}

	public void setOrigMerOrderAmt(BigDecimal origMerOrderAmt) {
		this.origMerOrderAmt = origMerOrderAmt;
	}
   
}
